<template>
    <div>
        <div class="work">
        <div class="container">
            <div class="box_img">
                <img src="../assets/img/ia_100000009430.png" alt="" class="auto-img">
                <div class="navbox">
                    <ul>
                    <router-link tag="li" to="">
                        <div class="imgbox">
                            <img src="../assets/img/alivc_icon_bottom_recorder_normal.png" alt="" class="auto-img">
                        </div>
                        <span>百城行动</span>
                    </router-link>
                    <router-link tag="li" to="/search">
                        <div class="imgbox">
                            <img src="../assets/img/icon_user_article.png" alt="" class="auto-img">
                        </div>
                        <span>查询</span>
                    </router-link>
                    <router-link tag="li" to="/my">
                        <div class="imgbox">
                            <img src="../assets/img/icon_user_un_certification.png" alt="" class="auto-img">
                        </div>
                        <span>我的信息</span>
                    </router-link>
                    
                    </ul>
                </div>
            </div>
            
            <div class="data">
                <ul>
                    <li>
                        <p>参与城市</p>
                        <span>387</span>
                    </li>
                    <li>
                        <p>入驻企业</p>
                        <span>38711</span>
                    </li>
                    <li>
                        <p>公益数</p>
                        <span>387万</span>
                    </li>
                    <li>
                        <p>公益者</p>
                        <span>407万</span>
                    </li>
                    
                </ul>
            </div>
            <div class="line1"></div>
            <div class="banner">
                <ul>
                    <li>
                        <img src="../assets/img/ia_100000009433.png" alt="" class="auto-img">
                    </li>
                </ul>
            </div>
            <div class="box_main">
                <div class="nav">
                    <ul>
                        <li @click="tabs(index)" :class="[nowindex==index?'com':'']" v-for="(item,index) in tab" :key="index">{{item}}</li>
                        
                    </ul>
                </div>
            </div>
            <lists-page v-show="this.nowindex==0"></lists-page>
            <lists-page-two v-show="this.nowindex==1"></lists-page-two>
            <lists-page v-show="this.nowindex==2"></lists-page>
            <lists-page-two v-show="this.nowindex==3"></lists-page-two>
            <div class="nullbox"></div>
            <banner-list></banner-list>
            
        </div>
    </div>
    </div>
</template>

<script>
import ListsPageTwo from '@/components/listsPageTwo.vue';
import bannerList from '../components/bannerList.vue';
import listsPage from '../components/listsPage.vue';
export default {
    data() {
      return {
        tab: ['温暖的BaoBao','操作指南','参与规则','综合资讯'],
        Tab: ['关注','精选','热门'],
        nowindex:0,
      };
    },
    methods:{
      tabs(index){
        this.nowindex=index;
      }
    },
    components:{
      bannerList,
      listsPage,
        ListsPageTwo
    }
}
</script>

<style lang="scss">
.work {
  .box_foot {
    margin-left: 13px;
    margin-right: 10px;
    ul {
      li {
        margin-top: 20px;
        margin-bottom: 15px;
        display: flex;
        justify-content: space-between;
        .titlebox {
          margin-right: 20px;
          flex: 1;
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          .title {
            font-weight: bold;
            margin-bottom: 16px;
            font-size: 17px;
          }
          .subtitle {
            span {
              color: #747474;
              font-weight: bold;
              font-size: 12px;
              &.con {
                    border: 1px solid red;
                    border-radius: 5px;
                    color: red;
                    font-size: 12px;
                    font-weight: bold;
                    padding: 2px;
                    margin-right: 5px;
              }
            }
          }
        }
        .imgbox {
          flex: 0.7;
          border-radius: 6px;
          overflow: hidden;
        }
      }
    }
  }
  footer {
    // margin-left: 13px;
    // margin-right: 10px;
    .employment {
      .imgbox {
        background: url(../assets/img/icon_service_selected.png) no-repeat -1px -4px;
        width: 42px;
        height: 42px;
      }
    }
    & > div {
      &:nth-child(4) {
        a {
          color: red;
        }
      }
    }
  }
  .box_img {
    width: 100%;
    height: 188px;
    position: relative;
  }
  .data {
    box-sizing: border-box;
    height: 140px;
    padding-top: 70px;
    margin-left: 35px;
    margin-right: 35px;
    ul {
      display: flex;
      justify-content: space-between;
      li {
        display: flex;
        flex-direction: column;
        align-items: center;
        p {
          margin-bottom: 10px;
          font-size: 15px;
          font-weight: 600;
        }
        span {
          font-size: 15px;
          color: #e5a547;
        }
      }
    }
  }
  .line1 {
    width: 100%;
    height: 6px;
    background-color: #f2f2f3;
  }
  .navbox {
    width: 92%;
    position: absolute;
    margin: 0 15px;
    height: 88px;
    background-color: #fff;
    padding-top: 15px;
    box-shadow: 1px 1px 8px #ccc;
    border-radius: 8px;
    bottom: -50px;
    ul {
      display: flex;
      justify-content: space-evenly;
      li {
        display: flex;
        flex-direction: column;
        align-items: center;
        span{
          font-size: 14px;
          font-weight: bold;
        }
        .imgbox {
          width: 45px;
          height: 45px;
          border-radius: 50%;
          margin-bottom: 5px;
        }
      }
    }
  }
  .banner {
    margin-bottom: 27px;
    ul {
      li {
        height: 228px;
      }
    }
  }
  .box_main {
    margin-left: 13px;
    margin-right: 10px;
    .nav {
      background-color: #f7f7f7;
      margin: 0 10px;
      margin-bottom: 15px;
      ul {
        display: flex;
        justify-content: space-between;
        li {
          font-size: 14px;
          font-weight: bold;
          padding: 7px;
          // &.con {
          //   background-color: #fff;
          //   box-shadow: 0 1px 5px #ccc;
          //   border-radius: 5px;
          // }
          &.com {
            background-color: #fff;
            box-shadow: 0 1px 5px #ccc;
            border-radius: 5px;
          }
        }
      }
    }
  }
}

</style>